package com.guigu.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 商品表
 * </p>
 *
 * @author Mr.Zhang
 * @since 2025-03-12
 */
@Data
@TableName("product")
public class Product implements Serializable {

    @Serial
    private static final long serialVersionUID=1L;

    //@ApiModelProperty(value = "商品id，主键，自增")
      @TableId(value = "product_id", type = IdType.AUTO)
    private Integer productId;

    //@ApiModelProperty(value = "商品名称")
    private String name;

    //@ApiModelProperty(value = "商品价格")
    private Float price;

    //@ApiModelProperty(value = "商品单位")
    private String unit;

    //@ApiModelProperty(value = "商品类型，格式为：一级分类id-二级分类id，例如：4-22")
    private String typeId;

    //@ApiModelProperty(value = "商品主展示图路径")
    private String imgLink;

    //@ApiModelProperty(value = "上架库存")
    private Integer stock;

    //@ApiModelProperty(value = "是否上架，1（上架），0（下架）")
    private Integer onOff;

    //@ApiModelProperty(value = "是否删除，C001-1（未删除）、C001-2（已删除）")
    private String status;

    //@ApiModelProperty(value = "总评论数")
    private Integer totalNumberOfComments;

    @TableField(exist = false)
    private List<ProductComment>  productComments;

    @TableField(exist = false)
    private List<ProductImg>  productImgs;

    @TableField(exist = false)
    private Integer num=1;

}
